export default {
  // 开启命名空间
  namespaced: true,

  // 数据
  state: () => ({
    todolist: uni.getStorageSync('todolist') || [],
   
  }),

  // 方法
  mutations: {
    updatetodolist(state, todolist) {
      state.todolist = todolist
      this.commit('m_todo/savetodolistToStorage')
    },
    savetodolistToStorage(state) {
      uni.setStorageSync('todolist', state.todolist)
    },
    
  },
}
